<template>
    <view>
        <view class="pd pt30 pm30 row" v-for="sd in 20">
        	<view class="col">
        		<view class="fz32 cf">
        			OPPO R9
        		</view>
        		<view class="mt20 z9 fz24">
        			2020-10-01 17:19:00
        		</view>
        	</view>
				<view class="fz28 cf xserrtye" v-if="kjjhhgsd">
					删除
				</view>
        </view>
    </view>
</template>
<script>
    export default {
        data() {
            return {
				kjjhhgsd:false
			}
        },
        components: {},
        methods: {
			setStyle(index, text) {
				let pages = getCurrentPages();
				let page = pages[pages.length - 1];
				// #ifdef APP-PLUS
				let currentWebview = page.$getAppWebview();
				let titleNView = currentWebview.getStyle().titleNView;
				// 添加文字过长截取为3个字符，请根据自己业务需求更改
				titleNView.buttons[0].text = text;
				currentWebview.setStyle({
					titleNView: titleNView
				});
				// #endif
				// #ifdef H5
				// h5 临时方案
				document.getElementsByClassName('uni-btn-icon')[1].innerText = text;
				// #endif
			},
		},
		onNavigationBarButtonTap(e) {
			let jjhhhsd = "编辑"
			if (this.kjjhhgsd){
				this.kjjhhgsd = false
			} else{
				this.kjjhhgsd = true
				jjhhhsd = "完成"
			}
			this.setStyle(0, jjhhhsd);
		},
        mounted() {}
    }

</script>
<style scoped>
	.xserrtye{
		width:132upx;
		height:60upx;
		text-align: center;
		line-height: 60upx;
		background:rgba(252,90,90,1);
		border-radius:12upx;
		margin-top: 20upx;
	}
</style>
